home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / dev / amos / AMOSList-0998.lzh / AMOSLIST / 000139_bounce-amos-li…net@onelist.com_Mon Sep 7 14:10:52 1998.msg < prev    next >
Text File  |  1998-10-01  |  20KB  |  2,253 lines

  1. >From bounce-amos-list--999-mcox=access.digex.net@onelist.com  Mon Sep  7 14:10:52 1998
  2. Received: from onelist.com (pop.onelist.com [209.207.164.13])
  3.     by pony-2.mail.digex.net (8.8.8/8.8.8) with SMTP id OAA00007
  4.     for <mcox@access.digex.net>; Mon, 7 Sep 1998 14:10:52 -0400 (EDT)
  5. Received: (qmail 25146 invoked by alias); 8 Sep 1998 18:09:34 -0000
  6. Received: (qmail 25140 invoked from network); 8 Sep 1998 18:09:32 -0000
  7. Received: from unknown (HELO mail.enterprise.net) (194.72.192.18) by pop.onelist.com with SMTP; 8 Sep 1998 18:09:32 -0000
  8. Received: from enterprise.net (root@ppp-249.telinco.net [212.1.129.12]) by mail.enterprise.net (8.8.5/8.8.5) with SMTP id TAA13568 for <amos-list@onelist.com>; Mon, 7 Sep 1998 19:10:19 +0100 (GMT/BST)
  9. From: Andrew Crowe <andrewcrowe@enterprise.net>
  10. To: amos-list@onelist.com
  11. Date: Mon, 07 Sep 1998 18:07:29 +0000
  12. Message-ID: <yam7554.1459.1191855640@mail.enterprise.net>
  13. In-Reply-To: <4A256678.00088B70.00@ns-it062791.qantas.com.au>
  14. X-Mailer: YAM 2.0 Preview5 - Amiga Mailer by Marcel Beck - http://www.yam.ch
  15. Organization: Manta Soft
  16. Mailing-List: list amos-list@onelist.com; contact http://www.onelist.com
  17. Delivered-To: mailing list amos-list@onelist.com
  18. Precedence: bulk
  19. Reply-to: amos-list@onelist.com
  20. Mime-Version: 1.0
  21. Content-type: multipart/mixed; boundary="BOUNDARY.1191855640.1"
  22. Subject: [amos-list] Rotating+Zooming line vectors!
  23. Status: O
  24. X-Status: 
  25.  
  26. From: Andrew Crowe <andrewcrowe@enterprise.net>
  27.  
  28. Warning: This is a message in MIME format. Your mail reader does not
  29. support MIME. Some parts of this message will be readable as plain text.
  30. To see the rest, you will need to upgrade your mail reader.
  31.  
  32.  
  33. --BOUNDARY.1191855640.1
  34. Content-Type: text/plain
  35.  
  36. Hi Everybody,
  37.  
  38.     I've now done a program that lets you create and then load/save a
  39. real 2d rotatable+zoomable  line vector object using only AMOSTurbo
  40. extention, which is easily converted to standard amos code. (take the F
  41. off 'F draw', 'F plot' etc.) 
  42.  
  43.     (The editor is a bit crappy and you can't load into to level editor,
  44. only after you finish in it and go into vector view mode ;)
  45.  
  46.     It could do with some optimisation, but it isn't too slow, I've
  47. included 2 example objects:
  48.  
  49. A Starship Enterprise, an XMas_Tree , a simpler Enterprise and a simple
  50. object.
  51.  
  52. The Enterprise and XMas_Tree updates at 25fps after compilation and the
  53. simpler ones
  54. updates at full speed (50 fps) on my 25mhz 040 ami ;)
  55.  
  56.  
  57.  
  58. Please feel free to optimise/use this code in your games, but I'd like
  59. to see the end result please ;)
  60.  
  61.  
  62.  
  63. See ya.
  64. -- 
  65.                                 <PRE>
  66.   - --------------------- Quote of the day: ---------------------- -
  67. I like work ... I can sit and watch it for hours.
  68.  
  69. +--------------------------------------------------------------------+
  70. |                                                ,aNNN               |
  71. |  a&   NL                 ,a,                 ,gNNNNN               |
  72. |  @7L d 0   ,a,,aw ,a,,  JN Q,  ,a,,aw,,,,  ,gNM"`NN'               |
  73. | J  9w"  K N" "" NN"""""WF  ~3&N" "" N   ""^N"    NF                |
  74. | N , " , Nd ,@M, NN JML @ML d@N ,@4, N       ',  JK                 |
  75. |d JMc dN  N  NN  NN 0 1 1J1 0 0  NN  N         L,K                  |
  76. |N,N 0w' Na@h,,a,,NQ,0 &J1J&,0  \,,a,,N         JF                   |
  77. | ""  "  ~"  ""~"""~"" ""  """  t""~"""        j"1                   |
  78. |                               F             JgmJ        ,gm        |
  79. |                               F            N"  N  ,,    F ,N gNN   |
  80. |      Andrew Crowe             Q          jJF  mP p""9w,NL NwmP 0mw |
  81. |      ~~~~~~~~~~~~             ]         / I  0 F@ am, Nw  ,0&   ,N |
  82. |       Manta Soft             ,F\      a' ,N  Nf L E 0 0ML N""N 0"  |
  83. |       ~~~~~~~~~~            ,N  \,  ,P N@"  JF  & `@" NJL N  N 0   |
  84. |                            ,N     ad"   \wam"   `Nx,aN JNmN  NmN   |
  85. |                            NN ,,gN" ""PP"                          |
  86. |                           dNNNNN"                                  |
  87. |                           NNN@"      Web Designing and          // |
  88. | Visit our Web Site:       ""               Amiga Programming \\//  |
  89. |                                                                    |
  90. |     HTTP://www.geocities.com/Eureka/Gold/1713/                     |
  91. |                                                                    |
  92. +----------------------------+      This signature was created using |
  93. | andrewcrowe@enterprise.net |         AsciiArt Studio               |
  94. +----------------------------+---------------------------------------+
  95.                                 </PRE>/
  96.  
  97. --BOUNDARY.1191855640.1
  98. Content-Type: text/plain; charset=iso-8859-1; name="LineRot"
  99. Content-Disposition: attachment; filename="LineRot"
  100. Content-Transfer-Encoding: quoted-printable
  101.  
  102. Set Buffer 64
  103. '
  104. 'Rotating line gfx by
  105. '
  106. '     andrewcrowe@enterprise.net =
  107.  
  108. '
  109.  
  110. Dim TMP(5,99,3),POS(5,99,3)
  111.  
  112. '
  113. ' PS. limit of 99 lines per shape  =
  114.  
  115. '    (not going to use more then that are you?)
  116. '
  117. ' Format used to store line gfx:   =
  118.  
  119. '
  120. ' TMP(shape_no,line_no,n)  =
  121.  
  122. '
  123. ' n=3D0 - X1 =
  124.  
  125. ' n=3D1 - Y1 =
  126.  
  127. ' n=3D2 - X2 =
  128.  
  129. ' n=3D3 - Y3 =
  130.  
  131. '  =
  132.  
  133. ' Pos(shape_no,line_number,n)  =
  134.  
  135. '
  136. ' n=3D0 - Ang1 =
  137.  
  138. ' n=3D1 - Dist1  =
  139.  
  140. ' n=3D2 - Ang2 =
  141.  
  142. ' n=3D3 - Dist2  =
  143.  
  144. '  =
  145.  
  146.  
  147. GRID=3D16
  148. '  =
  149.  
  150. ' Grid Makes it easier to make shapes  =
  151.  
  152. '  =
  153.  
  154. '   ( use + and - to adjust in editor no not change that line /\ ) =
  155.  
  156. '
  157.  
  158. Degree =
  159.  
  160.  
  161. '
  162. ' Use degrees! =
  163.  
  164. '
  165.  
  166.  
  167. Change Mouse 2
  168.  
  169. Screen Open 0,320,200,4,Lowres
  170. Flash Off =
  171.  
  172. Colour 1,$FFF
  173. Colour 2,$666
  174. Colour 3,$F00
  175. Curs Off =
  176.  
  177. Cls 0
  178.  
  179. Double Buffer =
  180.  
  181. Autoback 0
  182.  
  183. Print At(0,0);"Please select centre of rotation"
  184.  
  185. Screen Swap =
  186.  
  187.  
  188. Repeat =
  189.  
  190.    X=3DX Screen(X Mouse)/GRID
  191.    Y=3DY Screen(Y Mouse)/GRID
  192.    X=3DX*GRID
  193.    Y=3DY*GRID
  194.    CX=3DX
  195.    CY=3DY
  196.    Wait Vbl =
  197.  
  198. Until Mouse Key
  199.  
  200. Cls 0
  201.  
  202. Print At(0,0);"Please draw the shape with left mouse"
  203. Print "  Middle mouse deletes last line done"
  204. Print "(Press Right mouse when finished)"
  205. Print =
  206.  
  207. Print "  Press mouse to continue"
  208.  
  209. Plot CX,CY
  210.  
  211.  
  212. Screen Swap =
  213.  
  214.  
  215. Repeat : Wait Vbl : Until Mouse Key=3D0
  216. Repeat : Wait Vbl : Until Mouse Key
  217. Repeat : Wait Vbl : Until Mouse Key=3D0
  218.  
  219. NUN=3D-1
  220.  
  221. BUFF=3D-1
  222.  
  223. For A=3D0 To 99
  224.    TMP(0,A,0)=3D-1
  225. Next =
  226.  
  227.  
  228. '
  229. '  Clear line buffer to avoid doing too many lines when drawing
  230. '
  231. '
  232. '
  233.  
  234.  
  235. Repeat =
  236.  
  237.    =
  238.  
  239.    X=3DX Screen(X Mouse)/GRID
  240.    Y=3DY Screen(Y Mouse)/GRID
  241.    M=3DMouse Key
  242.    X=3DX*GRID
  243.    Y=3DY*GRID
  244.    I$=3DInkey$
  245.    =
  246.  
  247.    If I$=3D"=3D"
  248.       Add GRID,GRID,1 To 16
  249.    End If =
  250.  
  251.    If I$=3D"-"
  252.       Add GRID,-GRID/2,1 To 16
  253.    End If =
  254.  
  255.    =
  256.  
  257.    If GRID>1
  258.       For GX=3D0 To 320 Step GRID
  259.          For GY=3D0 To 200 Step GRID
  260.             F Plot GX,GY,2
  261.          Next =
  262.  
  263.       Next =
  264.  
  265.    End If =
  266.  
  267.    =
  268.  
  269.    =
  270.  
  271.    Ink 3
  272.    Plot CX,CY
  273.    Ink 1
  274.    Plot X,Y
  275.    =
  276.  
  277.    If M=3D4
  278.       TMP(0,BUFF,0)=3D-1
  279.       BUFF=3DBUFF-1
  280.       Repeat : Wait Vbl : Until Mouse Key=3D0
  281.    End If =
  282.  
  283.    =
  284.  
  285.    If BUFF>-1
  286.       For A=3D0 To BUFF
  287.          F Draw TMP(0,A,0),TMP(0,A,1) To TMP(0,A,2),TMP(0,A,3)
  288.       Next =
  289.  
  290.    End If =
  291.  
  292.    If BUFF>-1
  293.       For A=3D0 To BUFF
  294.          F Plot TMP(0,A,0),TMP(0,A,1),3
  295.          F Plot TMP(0,A,2),TMP(0,A,3),3
  296.       Next =
  297.  
  298.    End If =
  299.  
  300.    =
  301.  
  302.    If M=3D1
  303.       OX=3DX
  304.       OY=3DY
  305.       Repeat =
  306.  
  307.          X=3DX Screen(X Mouse)/GRID
  308.          Y=3DY Screen(Y Mouse)/GRID
  309.          M=3DMouse Key
  310.          X=3DX*GRID
  311.          Y=3DY*GRID
  312.          Ink 1
  313.          F Draw X,Y To OX,OY
  314.          =
  315.  
  316.          If GRID>1
  317.             For GX=3D0 To 320 Step GRID
  318.                For GY=3D0 To 200 Step GRID
  319.                   F Plot GX,GY,2
  320.                Next =
  321.  
  322.             Next =
  323.  
  324.          End If =
  325.  
  326.          =
  327.  
  328.          Ink 3
  329.          Plot CX,CY
  330.          Ink 1
  331.          Plot X,Y
  332.          =
  333.  
  334.          If BUFF>-1
  335.             For A=3D0 To BUFF
  336.                Ink 3
  337.                F Draw TMP(0,A,0),TMP(0,A,1) To TMP(0,A,2),TMP(0,A,3)
  338.             Next =
  339.  
  340.          End If =
  341.  
  342.          =
  343.  
  344.